package com.emm.yixun.openapi.hander;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.emm.yixun.common.app.ChannelToM2ReqDto;
import com.emm.yixun.common.app.ChannelToM2ResDto;
import com.emm.yixun.customer.service.CallCustomerServiceFacade;
import com.emm.yixun.openapi.dto.base.BaseRequestDTO;
import com.emm.yixun.openapi.dto.base.BaseResponseDTO;
import com.emm.yixun.openapi.vo.ChannelToM2ReqVo;

/**
 * 渠道->M2转客接口
 * @author liujunze
 *
 */
@Service("channelToM2Hander")
public class ChannelToM2Hander extends com.emm.yixun.openapi.hander.base.CommonAbstractHander{
	
	@Autowired
	private CallCustomerServiceFacade callCustomerServiceFacade;
	
	@SuppressWarnings("rawtypes")
	@Override
	public BaseResponseDTO doBusiness(BaseRequestDTO reqDto) {
		ChannelToM2ReqVo req = (ChannelToM2ReqVo)reqDto;
		ChannelToM2ReqDto reqDto1 = req.getParams();
		BaseResponseDTO<ChannelToM2ResDto> res = new BaseResponseDTO<ChannelToM2ResDto>();
		res.setResData(callCustomerServiceFacade.saveChannelToM2(reqDto1));
		return res;
	}
	
}
